package cn.haixiang.controller;


import cn.haixiang.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/order")
class OrderController {


    @Autowired
    private RestTemplate restTemplate;
    @RequestMapping("{id}")
    public User getUser(@PathVariable("id") Long id){
        String url ="http://localhost:10010/user/"+id;
        restTemplate.getForObject(url,User.class);
        return  null;

    }
}
